package com.github.soiff.shadow.plugin.helper;

import com.github.jknack.handlebars.Helper;
import com.github.jknack.handlebars.Options;

import java.io.IOException;

/**
 * Created by Soiff on 2016/05/20.
 *
 * @author : Soiff
 */
public class AssignHelper implements Helper<String> {
    @Override
    public CharSequence apply(String name, Options options) throws IOException {
        CharSequence finalValue = options.apply(options.fn);
        options.context.data(name, finalValue.toString().trim());
        return null;
    }
}
